<%@ page language="java" pageEncoding="UTF8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

	<div id="CreateProject">
		<p id="error">
			<logic:present name="messages">			
				<logic:iterate id="msg" name="messages">
					<br><bean:message bundle="inter" key="${fn:escapeXml(msg)}"/>
				</logic:iterate>
			</logic:present>
		</p>
		<div id="welcome">
			<div class="d0">
				<p class="legend"><bean:message bundle="inter" key="project.info.title"/></p>
				<ul>
					<li>
						<span class="evidence1"><bean:message bundle="inter" key="project.info.li1.titre"/>&nbsp;:&nbsp;</span>
						<bean:message bundle="inter" key="project.info.li1.contenu"/>
					</li>
					<li>
						<span class="evidence1"><bean:message bundle="inter" key="project.info.li2.titre"/>&nbsp;:&nbsp;</span>
						<bean:message bundle="inter" key="project.info.li2.contenu"/>
					</li>
				</ul>
			</div>
		</div>
	
		<html:form action="/createProject" styleClass="formType1" >
			<fieldset>
				<legend>
					<bean:message bundle="inter" key="project.legend"/>
				</legend>
				
				<p>
					<label for="title"><bean:message bundle="inter" key="project.form.title"/>&nbsp;:</label>
					<input type="text" name="title" id="title" class="mandatory" value="${fn:escapeXml(project.title)}" />
				</p>
				<p>
					<label for="start_date"><bean:message bundle="inter" key="project.form.start_date"/>&nbsp;:</label>
					<fmt:formatDate value="${project.start_date}" pattern="yyyy-MM-dd" var="start_date" type="date"/>
					<input type="text" name="start_date" id="start_date" class="mandatory" value="${fn:escapeXml(start_date)}"/>
				</p>
				<p>
					<label for="end_date"><bean:message bundle="inter" key="project.form.end_date"/>&nbsp;:</label>
					<fmt:formatDate value="${project.end_date}" pattern="yyyy-MM-dd" var="end_date" type="date"/>
					<input type="text" name="end_date" id="end_date" value="${fn:escapeXml(end_date)}"/>
				</p>
				<p>
					<label for="description"><bean:message bundle="inter" key="project.form.description"/>&nbsp;:</label>
					<textarea name="description" id="description">${fn:escapeXml(project.description)}</textarea>
				</p>
				<p>
					<label for="budget"><bean:message bundle="inter" key="project.form.budget"/>&nbsp;:&nbsp;</label>
					<input type="text" name="budget" id="budget" value="${fn:escapeXml(project.budget)}"/>
				</p>
				<p>
					<label for="url"><bean:message bundle="inter" key="project.form.url"/>&nbsp;:&nbsp;</label>
					<input type="text" name="url" id="url" value="${fn:escapeXml(project.url)}"/>
				</p>						
				<p>
					<input type="hidden" name="id" value="${fn:escapeXml(project.id)}" />
					<input type="hidden" name="cmde" value="createProject" />

					<input type="submit" value="<bean:message bundle="inter" key="profile.form.submit"/> &rarr;" />
				</p>
			</fieldset>
		</html:form>
	</div>
